<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	<link href="../assets/css/bootstrap.css" rel="stylesheet" />
	<!-- FONTAWESOME STYLES-->
	<link href="../assets/css/font-awesome.css" rel="stylesheet" />
	<!-- CUSTOM STYLES-->
	<link href="../assets/css/custom.css" rel="stylesheet" />
	<!-- GOOGLE FONTS-->
	<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
	<link rel="stylesheet" href="../assets/command/Bootstrap/bootstrap-3.3.0/css/bootstrap.min.css" />
	<link rel="stylesheet" href="../assets/command/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.css" />
	<script src="../assets/command/jquery-3.4.0.min.js"></script>
	<script src="../assets/command/Bootstrap/bootstrap-3.3.0/js/bootstrap.min.js"></script>
	<script src="../assets/command/bower_components/bootstrap-treeview/dist/bootstrap-treeview.min.js"></script>
	<script src="../assets/command/bower_components/moment/min/moment.min.js"></script>
	<script src="../assets/command/bower_components/moment/min/locales.min.js"></script>
	<script src="../assets/command/bower_components/bootbox/bootbox.min.js"></script>
	<script src="../assets/command/bower_components/bootstrap-select/dist/js/bootstrap-select.js" type="text/javascript"
	 charset="utf-8"></script>
	<script src="../assets/command/bower_components/bootstrap-switch/dist/js/bootstrap-switch.min.js" type="text/javascript"
	 charset="utf-8"></script>
	<script src="../assets/command/bower_components/bootstrap-table/dist/bootstrap-table.min.js" type="text/javascript"
	 charset="utf-8"></script>
	<script src="../assets/command/bower_components/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js" type="text/javascript"
	 charset="utf-8"></script>
	<script src="../assets/command/bower_components/moment/min/locales.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		$(function(){
			getRole();
			getRoles();
		})
		
		  function getRole() {
			$("#selRole").empty();
			$.ajax({
				type: "get",
				url: "../json/waibuselect.json",
				dataType: "json",
				success: function(data) {
					console.log(data);
					if (data != null) {
						$.each(data, function(index01, value01) {
							console.log("索引值：" + index01 + "值" + value01.rid + ";" + value01.rolename);
							$("#selRole").append("<option value>" + value01.rolename + "</option>")
						})
					}
				}
			})
		}
		
		  function getRoles() {
			$("#selRoles").empty();
			$.ajax({
				type: "get",
				url: "../json/zhiwu.json",
				dataType: "json",
				success: function(datas) {
					console.log(datas);
					if (datas != null) {
						$.each(datas, function(index1, value1) {
							console.log("索引值：" + index1 + "值" + value1.rids + ";" + value1.rolenames);
							$("#selRoles").append("<option value>" + value1.rolenames + "</option>")
						})
					}
				}
			})
		}
	</script>
	</head>
	<body>
		<div class="form-group">
			<label class="control-lable">角色</label>
			<select id="selRole" name="role"></select>
			<label class="control-lable">确定</label>
			<select id="selRoles" name="role"></select>
		</div>
	</body>
</html>
